package com.codemonkey.lq.qd.facotry.config.executer;


import com.codemonkey.lq.qd.ServiceContext;
import com.codemonkey.lq.qd.facotry.config.ActionDefinition;


/**
 * 针对每个Action的前置和后置操作
 * @author LQ
 * 
 */
public interface ActionHandler {
	
	/**
	 * @param currentActionDefinition  当前将要执行的Action,返回false,则放弃本次Action操作之后的所有的接下来的Action
	 * @param context 父级Service的运行过程中的Context
	 * @return 
	 * @throws Exception
	 */
	boolean preHandle(ActionDefinition currentActionDefinition, ServiceContext context) throws Exception;

	void afterHandle(ActionDefinition currentActionDefinition, ServiceContext context) throws Exception;
}
